-- GENERATED SPELL FOR [Bloodaxe Summoner] --


function spell0_9717(pUnit, Event) --@Arcane Missiles,n/a--
pUnit:FullCastSpellOnTarget(15791,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9717', 561, 1)
end

function spell1_9717(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(15532,pUnit)
pUnit:RegisterEvent('Sorts_9717', 8255, 1)
end

function spell2_9717(pUnit, Event) --@Summon,n/a--
pUnit:FullCastSpellOnTarget(15734,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9717', 1000, 1)
end

function Sorts_9717(pUnit, Event)
local choix_sorts_9717 = math.random(0, 2)
if choix_sorts_9717 == 0 then
pUnit:RegisterEvent('spell0_9717', 1, 1)
end
if choix_sorts_9717 == 1 then
pUnit:RegisterEvent('spell1_9717', 1, 1)
end
if choix_sorts_9717 == 2 then
pUnit:RegisterEvent('spell2_9717', 1, 1)
end
end

function mob9717_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_9717', math.random(1500, 3000), 1)
end

function mob9717_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9717_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9717_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(9717, 1, 'mob9717_Action')
RegisterUnitEvent(9717, 2, 'mob9717_Leave')
RegisterUnitEvent(9717, 3, 'mob9717_Kill')
RegisterUnitEvent(9717, 4, 'mob9717_Die')
